<?php
/**
 * Created by PhpStorm.
 * User: MrDong
 * Date: 2020/6/10
 * Time: 12:53
 */

namespace common\helpers;


class SendMsgHelper
{
    /**
     * 阿里云短信发送
     * @param $phone
     * @param $code
     * @return mixed
     */
    public static function sendMsg($phone, $code)
    {
        return \Yii::$app->aliyun->sendSms(
            "车团团", // 短信签名
            "SMS_190267959", // 短信模板编号
            $phone, // 短信接收者
            [  // 短信模板中字段的值
                "code" => $code
            ]
        );
    }
}